import request from '@/utils/request'

const baseURL = '/minio'

// 上传文件
export function upload (file) {
  const formData = new FormData()
  formData.append('file', file)
  return request({
    url: `${baseURL}/upload`,
    method: 'post',
    data: formData
  })
}

// 删除文件
export function remove (fileName) {
  return request({
    url: `${baseURL}/remove`,
    params: {
      fileName
    }
  })
}
